<?php defined('INDEX_FILE') or die('error001');


/**
* MLT Web Engine
* http://www.molot-soft.ru
*
* @package MLT_WE
* @subpackage Simple_TPL
* @author Ivan Chistyakov <ivan@molot-soft.ru>
* @version $Id: if.stpl.php 25 2007-12-21 12:49:52Z molotsoft@gmail.com $
* @link $HeadURL: http://simple-tpl.googlecode.com/svn/trunk/tags/if.stpl.php $
*/


class stpl_if_element extends simple_tpl_element {

	public function get_data() {
		$bool_exp = ((bool)$this->get_value() && !$this->isset_attribute('not')) || (!(bool)$this->get_value() && $this->isset_attribute('not'));
		return $bool_exp ? $this->get_param('then') : $this->get_param('else');
	}

}


?>